<div class="content forum_content">

    {%  include "forum/ForumBar.twig" with {
        "forum_bar_buttons_right" : buttons,
        "forum_bar_buttons_left" : [],
        "show_threads" : False,
        "thread_exists" : True,
        "show_more" : False,
        "show_filter": false
    } %}

    <div id="search_wrapper" style="max-width: 67vw">
        <table class="table table-striped table-bordered persist-area table-hover">
            <thead>
            <tr>
                <td width="45%">Post Content</td>
                <td width="25%">Author</td>
                <td width="10%">Timestamp</td>
            </tr>
            </thead>
            <tbody>
                {% for thread in threads %}
                    <tr class="info hoverable cursor-pointer" title="Go to thread" onclick="window.location = '{{ thread.thread_link }}';">
                        <td colspan="10" class="text-center"><h4>{{ thread.thread_title }}</h4></td>
                    </tr>
                    {% for post in thread.posts %}
                        <tr title="Go to post" class="cursor-pointer" onclick="window.location = '{{ post.post_link }}';" id="search-row-{{ post.count }}" class="hoverable">
                            <td align="left"><pre style="max-width: 67vw">
                                    <p class="post_content pre-wrap" style="word-wrap: break-word;">
                                        {% include "forum/RenderPost.twig" with { "post_content": post.post_content } only %}
                                    </p></pre></td>
                            <td>{{ post.visible_username }}</td>
                            <td>{{ post.posted_on }}</td>
                        </tr>
                    {% endfor %}
                {% endfor %}
            </tbody>
        </table>
        {% if count_threads == 0 %}
            <h4 id="search-hr">No threads match your search criteria.</h4>
        {% endif %}
    </div>

</div>